
**************************************************************************************
************************************************************************************** 
****                                                                              ****
**** The following STATA program files were used for the analysis in:             ****
****                                                                              ****
**** Reputation Management and Administrative Reorganization: How                 ****
**** Different Media Reputation Dimensions Matter for Agency Termination          ****
**** Please kindly acknowledge us when publishing your work using this data       ****
**** source--be it in whole or in part.                                           ****
****                                                                              ****
**** Contact us if you have any questions concerning either the                   ****
**** data  structure or programming.                                              ****
****                                                                              ****
**************************************************************************************
**************************************************************************************



use medrepfigures.dta,clear

*****Figure 1-2, A1-A5

********Figure 1 Total Number of PD Articles Mentioning Central Agencies Per Edition(1949–2019)

preserve
collapse (count) agencyid  (sum) tmediagbpc pergbpc morgbpc progbpc techgbpc, by(year)
twoway (line tmediagbpc year, color(orange)), xlabel(1949(5)2019)ylabel(0(100)1100) ytitle("Number of PD Articles Mentioning Agencies Per Edition")  xtitle("Year")
graph export "Figure 1.Total Number of PD Articles Mentioning Central Agencies Per Edition(1949–2019).eps", as(eps) preview(on) replace

**********Figure 2 Total Number of Four Reputation Symbols in PD Articles Per Edition Based on GBDT Algorithm (1949–2019)
twoway (line pergbpc year,color(blue) lpattern(solid)) (line morgbpc year,color(green)lpattern(longdash_dot))(line progbpc year, color(red)lpattern(shortdash)) ///
(line techgbpc year, color(orange)lpattern(longdash)), xlabel(1949(5)2019)ylabel(0(50)550)   xtitle(" ") ///
legend(label(1 "Performative Reputation") label(2 "Moral Reputation")label(3 "Procedural Reputation") label(4 "Technical Reputation"))

graph export "Figure 2.Total Number of Four Reputation Symbols in PD Articles Per Edition Based on GBDT Algorithm (1949–2019).eps", as(eps) preview(on) replace
restore 



preserve
collapse (count) agencyid  (sum) totalmediagb pergb morgb progb techgb (mean)ed, by(year)

*************FIGURE A1. Total Number of the PD Articles Mentioning Central Agencies (1949-2019)
twoway (line totalmediagb  year, color(gs12)), xlabel(1949(5)2019)ylabel(0(2000)14000)
graph export "Figure A1.Total Number of the PD Articles Mentioning Central Agencies (1949-2019).png", replace

*********FIGURE A2. The Number of the PD Editions in Each Year (1949-2019)
twoway (line ed year, color(blue)) , xlabel(1949(5)2019)ylabel(0(4)24)
graph export "Figure A2.The Number of the PD Editions in Each Year (1949-2019).png", replace

****FIGURE A3. Total Number of the PD Articles Mentioning the Four Reputation Symbols Based on the GBDT Algorithm (1949-2019)
twoway (line pergb year, color(blue)) (line morgb year, color(green))(line progb year, color(red)) (line techgb year, color(orange)), xlabel(1949(5)2019)ylabel(0(1000)6000)
graph export "Figure A3. Total Number of the PD Articles Mentioning the Four Reputation Symbols Based on the GBDT Algorithm (1949-2019).png", replace
restore 



***********FIGURE A4. Total Number of the PD Articles Mentioning the Four Reputation Symbols Per Edition Based on the NB algorithm (1949-2019)
preserve
collapse (count) agencyid  (sum) tmedianbpc pernbpc mornbpc pronbpc technbpc, by(year)
twoway (line pernbpc year,color(blue)) (line mornbpc year,color(green))(line pronbpc year, color(red)) (line technbpc year, color(orange)), xlabel(1949(5)2019)ylabel(0(50)550)
graph export "Figure A4.Total Number of the PD Articles Mentioning the Four Reputation Symbols Per Edition Based on the NB algorithm (1949-2019).png", replace
restore



**************FIGURE A5. Total Number of the PD articles Mentioning the Four Reputation Symbols Per Edition Based on the RF Algorithm (1949-2019)
preserve
collapse (count) agencyid  (sum) tmediarfpc perrfpc morrfpc prorfpc techrfpc, by(year)
twoway (line perrfpc year,color(blue)) (line morrfpc year,color(green))(line prorfpc year, color(red)) (line techrfpc year, color(orange)), xlabel(1949(5)2019)ylabel(0(50)550)
graph export "Figure A5. Total Number of the PD articles Mentioning the Four Reputation Symbols Per Edition Based on the RF Algorithm (1949-2019).png", replace
restore






